package com.github.cooingandwooing.config;

import org.springframework.context.annotation.Configuration;

/**
 * @author cooingandwooing
 */
@Configuration
public class FlowRuleConfig {
/*
    private static final String INTERFACE_RES_KEY = RuleService.class.getName();
    private static final String RES_KEY = INTERFACE_RES_KEY + ":rulePush()";

    public void initFlowRule(int interfaceFlowLimit, boolean method) {
        FlowRule flowRule = new FlowRule(INTERFACE_RES_KEY)
                .setCount(interfaceFlowLimit)
                .setGrade(RuleConstant.FLOW_GRADE_QPS);
        List<FlowRule> list = new ArrayList<>();
        if (method) {
            FlowRule flowRule1 = new FlowRule(RES_KEY)
                    .setCount(5)
                    .setGrade(RuleConstant.FLOW_GRADE_QPS);
            list.add(flowRule1);
        }
        list.add(flowRule);
        FlowRuleManager.loadRules(list);
    }*/
}
